home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 1998 November / maximum-cd-1998-11.iso / Truespace 4 / Data / PROGRAM / PROCSETS / set034 < prev    next >
Encoding:
Text File  |  1998-08-27  |  13.3 KB  |  785 lines

  1. %%BeginResource: procset AGM_Gradient_Sep 1.0 0
  2. %%Title: (AGM Gradient Procset)
  3. %%Version: 1.0 0
  4. %%CreationDate: (4/26/96) ()
  5. %%Copyright: ((C) 1987-1996 Adobe Systems Incorporated All Rights Reserved)
  6. userdict /defaultpacking currentpacking put true setpacking
  7. userdict /AGM_Gradient_Sep 5 dict dup begin put
  8. /AGM_Gradient_Sep_private 100 dict def
  9. /initialize{
  10.     AGM_Gradient_Sep begin
  11.     AGM_Gradient_Sep_private begin
  12.     _compositeJob{
  13.         initializeSinglePassSeps
  14.     }{
  15.         initializeMultiPassSeps
  16.     }ifelse
  17.     initializeSeps
  18.     AGM_Gradient_private begin
  19.         /_fillSD newSpotDict def
  20.         /_rampSD newSpotDict def
  21.         /_nCustomColorSD nd
  22.  end
  23.     AGM_Gradient_Sep_private
  24.     {
  25.         dup xcheck 1 index type /arraytype eq and
  26.         {
  27.             bind
  28.         }if
  29.         pop pop
  30.     }forall
  31.     AGM_Gradient_Sep
  32.     {
  33.         dup xcheck 1 index type /arraytype eq and
  34.         {
  35.             bind
  36.         }if
  37.         pop pop
  38.     }forall
  39.  end
  40.  
  41.     currentdict readonly pop
  42.  end
  43. }def
  44. /terminate{
  45.     currentdict AGM_Gradient_Sep eq{
  46.      end
  47.     }if
  48. }def
  49. AGM_Gradient_Sep_private begin
  50. /initializeSeps{
  51.     _noImage not _level2PS not and{
  52.         /linealFill{
  53.             currentoverprint{
  54.                 0 0 1 1 rectfill
  55.             }{
  56.                 mySave
  57.                 8 setImageParms
  58.                 _color{
  59.                     _nCustomColorSD begin
  60.                         cyan magenta yellow black
  61.  
  62.                         _spotColor{
  63.                             spot1/tintImage spot1/tintValue get 1 exch sub makeByte8 put
  64.                             spot2/tintImage spot2/tintValue get 1 exch sub makeByte8 put
  65.                         }if
  66.                  end
  67.  
  68.                     4{
  69.                         makeByte8 4 1 roll
  70.                     }repeat
  71.                     true 4 _nCustomColorSD ncolorimage
  72.                 }{
  73.                     _nCustomColorSD/black get 1 exch sub makeByte8
  74.                     _nCustomColorSD bwImage
  75.                 }ifelse
  76.                 myRestore
  77.             }ifelse
  78.         }def
  79.     }if
  80.     /_whiteBytes 1 makeByte8 pt
  81.      /knockOut{
  82.         _noImage _level2PS or currentoverprint or{
  83.             gsave
  84.             false setoverprint
  85.             1 setgray
  86.             0 0 1 1 rectfill
  87.             grestore
  88.         }{
  89.             8 setImageParms _whiteBytes /_image load 5 execImage
  90.         }ifelse
  91.     }def
  92.     /newSpotDict{
  93.         11 dict dup begin
  94.             /nSpots 2 def
  95.             /spot1 7 dict def
  96.             /spot2 7 dict def
  97.      end
  98.     }def
  99.     /initSpotData
  100.     {
  101.      begin
  102.             /name nd
  103.             /tintImage nd
  104.             /tintValue nd
  105.             /spot_C nd
  106.             /spot_M nd
  107.             /spot_Y nd
  108.             /spot_K nd
  109.      end
  110.     }def
  111.     /initSpotDict{
  112.      begin
  113.             /cyanInk nd
  114.             /magentaInk nd
  115.             /yellowInk nd
  116.             /blackInk nd
  117.             /cyan nd
  118.             /magenta nd
  119.             /yellow nd
  120.             /black nd
  121.             spot1 initSpotData
  122.             spot2 initSpotData
  123.      end
  124.     }def
  125.     /copySpotDict{
  126.         /_dst xp
  127.      begin
  128.             cyanInk magentaInk yellowInk blackInk
  129.             cyan magenta yellow black
  130.             spot1 spot2
  131.      end
  132.         _dst begin
  133.             /spot1 spot1 maxlength dict def
  134.             /spot2 spot2 maxlength dict def
  135.             spot2 copy pop
  136.             spot1 copy pop
  137.             /black xd
  138.             /yellow xd
  139.             /magenta xd
  140.             /cyan xd
  141.             /blackInk xd
  142.             /yellowInk xd
  143.             /magentaInk xd
  144.             /cyanInk xd
  145.      end
  146.     }def
  147.     /setCustomColor
  148.     {
  149.         1 index /Black eq{
  150.             6 1 roll 5 npop
  151.             1 exch sub
  152.             setgray
  153.         }{
  154.             6 1 roll _ccAry1 astore exch
  155.             dup null eq{
  156.                 pop 0
  157.             }if
  158.             setcustomcolor
  159.         }ifelse
  160.     }def
  161.     /setCStop{
  162.         /_colorStyle exch pt
  163.  
  164.         _colorStyle 0 eq{
  165.             0 0 0
  166.             4 -1 roll
  167.             1 exch sub
  168.             _spotColor{
  169.                 /_colorStyle 3 pt
  170.                 /Black
  171.                 1 index
  172.                 1 exch sub
  173.             }if
  174.         }if
  175.         _colorStyle 2 eq{
  176.             3 npop
  177.         }if
  178.         _rampSD _fillSD copySpotDict
  179.  
  180.         _colorStyle 4 eq{
  181.             pop
  182.             9 2 roll 3 npop 6 -2 roll
  183.         } if
  184.  
  185.         _colorStyle 3 eq _colorStyle 4 eq or{
  186.  
  187.             _fillSD begin
  188.                 /_spot1 spot1 pt
  189.                 /_spot2 spot2 pt
  190.          end
  191.  
  192.             exch dup _spot1/name get eq{
  193.                 _spot1 _spot2
  194.             }{
  195.                 _spot2 _spot1
  196.             }ifelse
  197.          begin
  198.              begin
  199.                     /name xd
  200.                     1 exch sub /tintValue xd
  201.                     4{
  202.                         tintValue mul 4 1 roll
  203.                     }repeat
  204.                     _spotColor not{
  205.                         /tintValue null def
  206.                     }if
  207.              end
  208.                 /tintValue 0 def
  209.          end
  210.         }if
  211.         _fillSD nsetcustomcolor
  212.     }def
  213.     /renderCMYK{
  214.         spot1/name get null eq
  215.         spot2/name get null eq and
  216.         dup not{
  217.             pop
  218.             spot1 spotConverted
  219.         }if
  220.         dup not{
  221.             pop
  222.             spot2 spotConverted
  223.         }if
  224.     }def
  225.     /currentInk{
  226.         true
  227.         _inRipSep{
  228.             currentcolorspace 0 get
  229.             dup /DeviceGray eq
  230.             1 index /DeviceCMYK eq or{
  231.                 pop
  232.                 currentcmykcolor add add add 0 eq{
  233.                     pop false
  234.                 }if
  235.             }{
  236.                 /Separation eq{
  237.                     currentcolor 0 eq{
  238.                         pop false
  239.                     }if
  240.                 }if
  241.             }ifelse
  242.         }{
  243.             currentgray 1 eq{
  244.                 pop false
  245.             }if
  246.         }ifelse
  247.     }def
  248.     /currentInkN{
  249.  
  250.         _nCustomColorSD begin
  251.             /_spot1 spot1 pt
  252.             /_spot2 spot2 pt
  253.             renderCMYK
  254.      end
  255.         {
  256.             currentInk
  257.         }{
  258.             gsave
  259.             _spot1 begin
  260.                 name null ne{
  261.                     spot_C spot_M spot_Y spot_K name tintValue setCustomColor
  262.                     currentInk
  263.                 }{
  264.                     false
  265.                 }ifelse
  266.          end
  267.             _spot2 begin
  268.                 name null ne{
  269.                     spot_C spot_M spot_Y spot_K name tintValue setCustomColor
  270.                     currentInk
  271.                 }{
  272.                     false
  273.                 }ifelse
  274.          end
  275.             grestore
  276.  
  277.             or
  278.         } ifelse
  279.     }def
  280.     /fill_ /fill load def
  281.     /fillOvp{
  282.         currentoverprint{
  283.             _inRipSep{
  284.                 currentcolorspace 0 get
  285.                 dup /DeviceGray eq
  286.                 1 index /DeviceCMYK eq or{
  287.                     pop
  288.                     currentcmykcolor add add add 0 eq{
  289.                         newpath
  290.                     }if
  291.                 }{
  292.                     /Separation eq{
  293.                         currentcolor 0 eq{
  294.                             newpath
  295.                         }if
  296.                     }if
  297.                 }ifelse
  298.             }{
  299.                 currentgray 1 eq{
  300.                     newpath
  301.                 }if
  302.             }ifelse
  303.         }if
  304.         fill_
  305.     }def
  306.     /fill{
  307.         _nCustomColorSD begin
  308.             /_spot1 spot1 pt
  309.             /_spot2 spot2 pt
  310.             renderCMYK
  311.      end
  312.  
  313.         {
  314.             fillOvp
  315.         }{
  316.             _spot1 begin
  317.                 gsave
  318.                 name null ne{
  319.                     spot_C spot_M spot_Y spot_K name tintValue setCustomColor
  320.                 }{
  321.                     1 setgray
  322.                 }ifelse
  323.                 fillOvp
  324.                 grestore
  325.          end
  326.             _spot2 begin
  327.                 name null ne{
  328.                     gsave
  329.                     true setoverprint
  330.                     spot_C spot_M spot_Y spot_K name tintValue setCustomColor
  331.                     fillOvp
  332.                     grestore
  333.                 }if
  334.          end
  335.             newpath
  336.         }ifelse
  337.     }def
  338.     /expandSpot{
  339.         _spotColor{
  340.             /_len xp
  341.             _rampSD begin
  342.                 spot1 begin
  343.                     tintImage null ne{
  344.                         tintImage _len expandOne /tintImage xd
  345.                     }if
  346.              end
  347.                 spot2 begin
  348.                     tintImage null ne{
  349.                         tintImage _len expandOne /tintImage xd
  350.                     }if
  351.              end
  352.          end
  353.         }{
  354.             pop
  355.         }ifelse
  356.     }def
  357.     /rampImage{
  358.         _enabledSmoothShade{
  359.             fillRamp
  360.         }{
  361.             currentoverprint{
  362.                 rectImage
  363.             }{
  364.                 _color{
  365.                     _rampSD begin
  366.                         /cyanInk _cyanData 0 ne def
  367.                         /magentaInk _magentaData 0 ne def
  368.                         /yellowInk _yellowData 0 ne def
  369.                         /blackInk _blackData 0 ne def
  370.                  end
  371.  
  372.                     _nSamples setImageParms
  373.                     _nSamples expandSpot
  374.                     _cyanData _magentaData _yellowData _blackData _nSamples 4 expandColor
  375.                     true 4 _rampSD ncolorimage
  376.                 }{
  377.                     _rampSD begin
  378.                         /cyanInk false def
  379.                         /magentaInk false def
  380.                         /yellowInk false def
  381.                         /blackInk true def
  382.                  end
  383.                     _nSamples setImageParms
  384.                     _blackData _rampSD bwImage
  385.                 }ifelse
  386.             }ifelse
  387.         }ifelse
  388.     }def
  389.     /nsetcustomcolor where{
  390.         pop
  391.     }{
  392.         /nsetcustomcolor
  393.         {
  394.             /_nCustomColorSD xp
  395.             _nCustomColorSD begin
  396.                 4 copy
  397.                 /black xd
  398.                 /yellow xd
  399.                 /magenta xd
  400.                 /cyan xd
  401.                 4 copy
  402.                 0 ne /blackInk xd
  403.                 0 ne /yellowInk xd
  404.                 0 ne /magentaInk xd
  405.                 0 ne /cyanInk xd
  406.          end
  407.             setcmykcolor
  408.         }def
  409.     }ifelse
  410.     /nsetcustomcolorend where{
  411.         pop
  412.     }{
  413.         /nsetcustomcolorend
  414.         {
  415.             /_nCustomColorSD null pt
  416.         }def
  417.     }ifelse
  418.     /getRampColorSpace{
  419.  
  420.         /_renderCMYK _rampSD begin renderCMYK end pt
  421.  
  422.         _renderCMYK not{
  423.             _rampSD begin
  424.                 [/DeviceN
  425.                     [
  426.                     spot1 begin
  427.                         name null ne tintImage null ne and{
  428.                             name
  429.                         }if
  430.                  end
  431.                     spot2 begin
  432.                         name null ne tintImage null ne and{
  433.                             name
  434.                         }if
  435.                  end
  436.                     ] /DeviceCMYK {}
  437.                 ] setcolorspace
  438.          end
  439.             /_nColorSpace currentcolorspace pt
  440.         }if
  441.  
  442.         _nSamples 1 gt{
  443.             /_ndx 0 pt
  444.             [blendColor] cvx exec
  445.         }if
  446.         _renderCMYK{
  447.             /_C0 [currentcolor] pt
  448.             /_C0_Space currentcolorspace pt
  449.         }{
  450.             /_C0 [
  451.                 _nCustomColorSD begin
  452.                     spot1 begin
  453.                         name null ne{
  454.                             tintValue
  455.                         }if
  456.                  end
  457.                     spot2 begin
  458.                         name null ne{
  459.                             tintValue
  460.                         }if
  461.                  end
  462.              end
  463.             ] pt
  464.             /_C0_Space _nColorSpace pt
  465.         }ifelse
  466.  
  467.         _nSamples 1 gt{
  468.             /_ndx _nSamples 1 sub pt
  469.             [blendColor] cvx exec
  470.         }if
  471.         _renderCMYK{
  472.             /_C1 [currentcolor] pt
  473.             /_C1_Space currentcolorspace pt
  474.         }{
  475.             /_C1 [
  476.                 _nCustomColorSD begin
  477.                     spot1 begin
  478.                         name null ne{
  479.                             tintValue
  480.                         }if
  481.                  end
  482.                     spot2 begin
  483.                         name null ne{
  484.                             tintValue
  485.                         }if
  486.                  end
  487.              end
  488.             ] pt
  489.             /_C1_Space _nColorSpace pt
  490.         }ifelse
  491.  
  492.         /_rampColorSpace _C0_Space pt
  493.         _spotColor{
  494.             nsetcustomcolorend
  495.         }if
  496.     }def
  497. }def
  498. /initializeSinglePassSeps{
  499.     /_decodeNorm    [0 1] pt
  500.     /_decodeInvert     [1 0] pt
  501.     /spotConverted
  502.     {
  503.      begin
  504.             name null eq{
  505.                 false
  506.             }{
  507.                 tintValue null eq tintImage null eq and{
  508.                     true
  509.                 }{
  510.                     false
  511.                     currentpagedevice/SeparationOrder get{name eq or}forall
  512.                     not
  513.                 }ifelse
  514.             }ifelse
  515.      end
  516.     }def
  517.     /dictImage
  518.     {
  519.         20 dict dup begin
  520.             /Dict xd
  521.             /Decode xd
  522.             /DataSource xd
  523.             /ImageMatrix xd
  524.             /BitsPerComponent xd
  525.             /Height xd
  526.             /Width xd
  527.             /ImageType 1 def
  528.             Dict
  529.      end
  530.         /_image load 1 execImage
  531.     }def
  532.     /bwImage{
  533.      begin
  534.             gsave
  535.             currentoverprint{
  536.                 blackInk{
  537.                     [/Separation /Black /DeviceGray{}] setcolorspace
  538.                     _decodeInvert dictImage
  539.                 }{
  540.                     5 npop
  541.                 }ifelse
  542.             }{
  543.                 /DeviceGray setcolorspace
  544.                 _decodeNorm dictImage
  545.             }ifelse
  546.             grestore
  547.      end
  548.     }def
  549.     /ncolorimage where{
  550.         pop
  551.     }{
  552.         /ncolorimage{
  553.          begin
  554.                 renderCMYK{
  555.                     cyanInk
  556.                     magentaInk and
  557.                     yellowInk and
  558.                     blackInk and
  559.                     not
  560.                     currentoverprint
  561.                     and{
  562.                         pop pop
  563.                         gsave
  564.                         cyanInk{
  565.                             8 copy
  566.                             [/Separation /Cyan /DeviceGray{}] setcolorspace
  567.                             3 npop
  568.                             _decodeNorm dictImage
  569.                         }if
  570.                         magentaInk{
  571.                             8 copy
  572.                             [/Separation /Magenta /DeviceGray{}] setcolorspace
  573.                             4 -1 roll
  574.                             3 npop
  575.                             _decodeNorm dictImage
  576.                         }if
  577.                         yellowInk{
  578.                             8 copy
  579.                             [/Separation /Yellow /DeviceGray{}] setcolorspace
  580.                             4 -2 roll
  581.                             3 npop
  582.                             _decodeNorm dictImage
  583.                         }if
  584.                         blackInk{
  585.                             4 -3 roll
  586.                             [/Separation /Black /DeviceGray{}] setcolorspace
  587.                             3 npop
  588.                             _decodeNorm dictImage
  589.                         }{
  590.                             8 npop
  591.                         }ifelse
  592.                         grestore
  593.                     }{
  594.                         /_colorimage load 10 execImage
  595.                     }ifelse
  596.                 }{
  597.                     6 npop
  598.                     gsave
  599.                     spot1 begin
  600.                         name null ne tintImage null ne and{
  601.                             [/Separation name /DeviceGray{}] setcolorspace
  602.                             4 copy
  603.                             tintImage
  604.                             name /Black eq{
  605.                                 _decodeNorm
  606.                             }{
  607.                                 _decodeInvert
  608.                             }ifelse
  609.                             dictImage
  610.                         }{
  611.                             1 setgray fill
  612.                         }ifelse
  613.                  end
  614.                     spot2 begin
  615.                         true setoverprint
  616.                         name null ne tintImage null ne and{
  617.                             [/Separation name /DeviceGray{}] setcolorspace
  618.                             tintImage
  619.                             name /Black eq{
  620.                                 _decodeNorm
  621.                             }{
  622.                                 _decodeInvert
  623.                             }ifelse
  624.                             dictImage
  625.                         }{
  626.                             4 npop
  627.                             1 setgray fill
  628.                         }ifelse
  629.                  end
  630.                     grestore
  631.                 }ifelse
  632.          end
  633.         }def
  634.     }ifelse
  635. }def
  636. /initializeMultiPassSeps{
  637.     /_isCMYKSep
  638.         _cyanPlate _magentaPlate or _yellowPlate or _blackPlate or
  639.     pt
  640.     /invertXfer{
  641.         [
  642.         {
  643.             1 exch sub
  644.         }/exec load systemdict /currenttransfer get exec /exec load
  645.         ] cvx systemdict /settransfer get exec
  646.     }def
  647.     /ccThrough{
  648.         gsave
  649.         1 setCustomColor
  650.         currentcmykcolor
  651.         grestore
  652.         add add add 0 ne
  653.     }def
  654.     /spotConverted
  655.     {
  656.      begin
  657.             _isCMYKSep not{
  658.                 false
  659.             }{
  660.                 name null eq{
  661.                     false
  662.                 }{
  663.                     tintValue null eq tintImage null eq and{
  664.                         true
  665.                     }{
  666.                         spot_C spot_M spot_Y spot_K name ccThrough
  667.                     }ifelse
  668.                 }ifelse
  669.             }ifelse
  670.      end
  671.     }def
  672.     /spotChannel
  673.     {
  674.         _isCMYKSep{
  675.             pop false
  676.         }{
  677.             /_spotDict xp
  678.                 _spotDict/name get null eq{
  679.                     false
  680.                 }{
  681.                     _spotDict/spot_C get
  682.                     _spotDict/spot_M get
  683.                     _spotDict/spot_Y get
  684.                     _spotDict/spot_K get
  685.                     _spotDict/name get
  686.                     ccThrough
  687.                 }ifelse
  688.         }ifelse
  689.     }def
  690.     /getChannelData
  691.     {
  692.         _isCMYKSep dup{
  693.             pop renderCMYK
  694.         }if
  695.         {
  696.             _blackPlate{
  697.                 4 1 roll 3 npop blackInk
  698.             }{
  699.                 _yellowPlate{
  700.                     4 2 roll 3 npop yellowInk
  701.                 }{
  702.                     _magentaPlate{
  703.                         4 3 roll 3 npop magentaInk
  704.                     }{
  705.                         3 npop cyanInk
  706.                     }ifelse
  707.                 }ifelse
  708.             }ifelse
  709.             {
  710.                 true /nonZeroData
  711.             }{
  712.                 true /zeroData
  713.             }ifelse
  714.         }{
  715.             4 npop
  716.             spot1/name get null ne
  717.             spot1 spotChannel and{
  718.                 spot1/tintImage get dup null ne{
  719.                     false /nonZeroData
  720.                 }{
  721.                     pop false /noData
  722.                 }ifelse
  723.             }{
  724.                 spot2/name get null ne
  725.                 spot2 spotChannel and{
  726.                     spot2/tintImage get dup null ne{
  727.                         false /nonZeroData
  728.                     }{
  729.                         pop false /noData
  730.                     }ifelse
  731.                 }{
  732.                     false /noData
  733.                 }ifelse
  734.             }ifelse
  735.         }ifelse
  736.     }def
  737.     /renderChannelData
  738.     {
  739.         /_tmp xp
  740.         _tmp /nonZeroData ne currentoverprint and{
  741.             pop
  742.             _tmp /zeroData eq{pop}if
  743.             4 npop
  744.         }{
  745.             _tmp /nonZeroData eq{
  746.                 {
  747.                     invertXfer
  748.                 }if
  749.                     systemdict/image
  750.                 get 5 execImage
  751.             }{
  752.                 pop
  753.                 _tmp /zeroData eq{pop}if
  754.                 4 npop
  755.                 knockOut
  756.             }ifelse
  757.         }ifelse
  758.     }def
  759.     /bwImage{
  760.      begin
  761.             gsave
  762.             dup dup dup
  763.             getChannelData
  764.             exch pop false exch
  765.             renderChannelData
  766.             grestore
  767.      end
  768.     }def
  769.     /ncolorimage{
  770.      begin
  771.             pop pop
  772.             gsave
  773.             spot2/name get null ne spot2 spotChannel and{
  774.                 true setoverprint
  775.             }if
  776.             getChannelData
  777.             renderChannelData
  778.             grestore
  779.      end
  780.     }def
  781. }def
  782. end
  783. end
  784. defaultpacking setpacking
  785. %%EndResource